home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 113 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // Cyberdog 1.0b3 does not work properly when you call it from threads it did not
- // create. Since this is required for our blocking synchronous input code, we can
- // not use it until we get a newer Cyberdog. We'll be forced to use idle-time
- // input instead, which is clumsier and undesirable in general.
- #define USETHREADSFLAG 1
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- #ifndef FWCYPART_H
- #include "FWCyPart.h"
- #endif
-
- #if !USETHREADSFLAG
-
- #ifndef FWIDLE_H
- #include "FWIdle.h"
- #endif
-
- #ifndef FWCYSTRM_H
- #include "FWCyStrm.h"
- #endif
-
- #endif
-
- //========================================================================================
- // Forward Class Declaration
- //========================================================================================
-
- class FW_CPresentation;
- class ODFrame;
-
- //========================================================================================
- // CLASS CPart
- //========================================================================================
-
- class CPart: public FW_CPart
- #if !USETHREADSFLAG
- , public FW_CIdler
- #endif
- {
- public:
- FW_DECLARE_AUTO(CPart)
-
- //----------------------------------------------------------------------------------------
- // Constructor/Destructor
- //
- public:
- CPart (ODPart* odPart);
- virtual ~CPart ();
-
- //----------------------------------------------------------------------------------------
- // Inherited API from FW_CPart
- //
- public:
- void Initialize (Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
- FW_CContent* NewPartContent (Environment* ev);
- FW_CFrame* NewFrame (Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage);
-
- void ExternalizeContent (Environment* ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
- FW_Boolean InternalizeContent (Environment* ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
-
- virtual FW_Handled DoAdjustMenus (Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Handled DoMenu (Environment* ev, const FW_CMenuEvent& event);
-
- //----------------------------------------------------------------------------------------
- // Cyberdog Support
- //
- public:
- static void LoadCyberItem (Environment* ev, void* selfCPart);
- FW_CCyberdogHelper* GetCyberdogHelper();
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- public:
- // CONTENTDATA. A real part with more complex data would probably use a content
- // model object and have accessors and the like. A simple text viewer doesn't
- // need that.
- Handle fDownloadedText;
- FW_Boolean fAutoReload;
- long fStartTime;
-
- private:
- FW_CCyberdogHelper* fCyberdogHelper;
- FW_CPresentation* fPresentation;
- };
-
- //----------------------------------------------------------------------------------------
- // CPart::GetCyberdogHelper
- //----------------------------------------------------------------------------------------
- inline FW_CCyberdogHelper* CPart::GetCyberdogHelper ()
- {
- return fCyberdogHelper;
- }
-
- #endif // PART_H
-
-